package com.edocbase.desktop.lightweight.widgets.richeditor.commands;


public enum CommandState {

	ON("1.0"), OFF("2.0"), DISABLED("3.0"),TRUE("true"),FALSE("false");
	
	private final String state;

	CommandState(String representation) {
		this.state = representation;
	}

	public static CommandState fromString(String str) {
		for (CommandState state : CommandState.values()) {
			if (state.state.equals(str)) {
				return state;
			}
		}
		return DISABLED;
	}

	public String getState() {
		return state;
	}

}